package com.aaa.controller.SAS;

import com.aaa.entity.LayData;
import com.aaa.entity.MyPage;
import com.aaa.entity.SASaPlane;
import com.aaa.entity.User;
import com.aaa.service.SAS.SASaPlaneService;
import com.aaa.service.SAS.impl.SASaPlaneServicelmpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.Date;

@RestController
@RequestMapping("tFpaPlane")
public class SASaPlaneController {
    @Autowired
    private SASaPlaneService saSaPlaneService;


    // 查询所有的执行计划
    @GetMapping
    public LayData queryAll(MyPage myPage){
        return new LayData(saSaPlaneService.queryAll(myPage));
    }

    @PostMapping
    public LayData checkCode(SASaPlane plane){
        return new LayData(saSaPlaneService.selectPlane(plane));
    }
    @PostMapping("add")
    @ResponseBody
    public LayData addPlane(SASaPlane plane){
     boolean asatj=saSaPlaneService.addPlane(plane);
     return new LayData(asatj);
    }
    @GetMapping("getByCode")
    public LayData queryByQyCode(SASaPlane saSaPlane){
        return new LayData(saSaPlaneService.queryByQyCode(saSaPlane));
    }
}
